﻿<!DOCTYPE html>
<html lang="zh-Hans" xmlns:th="http://www.thymeleaf.org">
<th:block th:include="frontInclude :: frontHeader"/>
<link rel="stylesheet" th:href="@{/css/subsidiaries-styles.css}" type="text/css" media="all" charset="utf-8">
<body class="wel-body">
<header class="headerbox pcbox" th:replace="frontInclude :: header_menu"></header>
<div class="mbox" th:replace="frontInclude :: header_menu_mobile"></div>
<div class="con-banner">
    <div class="images pcbox"
         th:style="'background:url('+@{/img/banner3.jpg}+') no-repeat center;background-size: cover;'">
    </div>
    <img img class="mbox h500" th:src="@{/img/banner3.jpg}" alt="走进黑蝎">
    <div class="words">
        <div class="text w1280">
            <div class="tit-en tit-48 secwen">SUBSIDIARIES</div>
            <div class="tit-cn tit-36 secwen add1">子公司</div>
            <div class="line secwen add2"></div>
        </div>
    </div>
</div>
<div class="con-column secwen animate">
    <div class=" column-swiper w1280" data-s="7" data-l="6" data-m="3">
        <div class="swiper-container swiper-container-horizontal">
            <div class="swiper-wrapper">
                <div th:each="item : ${currentChildren}"
                     th:class="@{${item.active!=null && item.active==1?'swiper-slide-active':''}+' swiper-slide'}"
                     style="width: 155.571px;">
                    <a th:href="${item.pageUrl}"
                       th:class="@{${item.active!=null && item.active==1?'active':''}+' items'}">
                        <div class="span" th:text="${item.menuName}">黑蝎简介</div>
                    </a>
                </div>
            </div>
        </div>
        <div class="buts">
            <div class="swiper-button-prev swiper-button-disabled"></div>
            <div class="swiper-button-next swiper-button-disabled"></div>
        </div>
    </div>
</div>

<!-- 子公司展示区域 -->
<div class="subsidiaries-section secwen add1">
    <div class="container">
        <div class="section-title text-center">
            <h2 style="display: inline-block; position: relative; padding-bottom: 20px;">子公司展示
                <span style="position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background-color: #e41e26;"></span>
            </h2>
            <p>黑蝎集团旗下子公司，各具特色，协同发展</p>
        </div>
        
        <div class="subsidiaries-list">
            <div th:each="company,iterStat : ${articleList}" 
                 class="'company-item layout-1">
                
                <!-- 布局1: 左图右文 -->
                <div  class="company-content">
                    <div class="company-image">
                        <img th:src="${company.articleLogo}" th:alt="${company.articleTitle}" />
                        <div class="company-number" th:text="'0' + ${iterStat.index + 1}">01</div>
                    </div>
                    <div class="company-info">
                        <h2 th:text="${company.articleTitle}">子公司名称</h2>
                        <p th:text="${company.articleDescribe}">公司简介</p>
                        <a th:href="@{'/front/articleView/' + ${company.id}}" class="btn-detail">了解更多</a>
                    </div>
                </div>
                
<!--                &lt;!&ndash; 布局2: 左文右图 &ndash;&gt;-->
<!--                <div th:if="${iterStat.index % 4 == 1}" class="company-content reverse">-->
<!--                    <div class="company-info">-->
<!--                        <h2 th:text="${company.articleTitle}">子公司名称</h2>-->
<!--                        <p th:text="${company.articleDescribe}">公司简介</p>-->
<!--                        <a th:href="@{'/front/articleView/' + ${company.id}}" class="btn-detail">了解更多</a>-->
<!--                    </div>-->
<!--                    <div class="company-image">-->
<!--                        <img th:src="${company.articleLogo}" th:alt="${company.articleTitle}" />-->
<!--                        <div class="company-number" th:text="'0' + ${iterStat.index + 1}">02</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--                -->
<!--                &lt;!&ndash; 布局3: 居中大图 &ndash;&gt;-->
<!--                <div th:if="${iterStat.index % 4 == 2}" class="company-content centered">-->
<!--                    <div class="company-hero">-->
<!--                        <img th:src="${company.articleLogo}" th:alt="${company.articleTitle}" />-->
<!--                        <div class="hero-overlay">-->
<!--                            <div class="company-number" th:text="'0' + ${iterStat.index + 1}">03</div>-->
<!--                            <h2 th:text="${company.articleTitle}">子公司名称</h2>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="company-description">-->
<!--                        <p th:text="${company.articleDescribe}">公司简介</p>-->
<!--                        <a th:href="@{'/front/articleView/' + ${company.id}}" class="btn-detail">了解更多</a>-->
<!--                    </div>-->
<!--                </div>-->
<!--                -->
<!--                &lt;!&ndash; 布局4: 卡片式 &ndash;&gt;-->
<!--                <div th:if="${iterStat.index % 4 == 3}" class="company-content card-style">-->
<!--                    <div class="card-wrapper">-->
<!--                        <div class="card-image">-->
<!--                            <img th:src="${company.articleLogo}" th:alt="${company.articleTitle}" />-->
<!--                        </div>-->
<!--                        <div class="card-body">-->
<!--                            <div class="company-number" th:text="'0' + ${iterStat.index + 1}">04</div>-->
<!--                            <h2 th:text="${company.articleTitle}">子公司名称</h2>-->
<!--                            <p th:text="${company.articleDescribe}">公司简介</p>-->
<!--                            <a th:href="@{'/front/articleView/' + ${company.id}}" class="btn-detail">了解更多</a>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
            </div>
        </div>
    </div>
</div>

<div th:replace="frontInclude :: footer"></div>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const images = document.querySelectorAll('.subsidiaries-section img');
    images.forEach(img => {
        img.addEventListener('error', function() {
            this.src = '/img/default-company.png';
            this.alt = '默认公司图片';
        });
    });
});
</script>

</body>
</html>